class Bar{
    // creatDiv:string
     constructor(public oDiv,public width,public height,public borderRadius,public color,public position){
      oDiv.style.width=width;
      oDiv.style.height=height;
      oDiv.style.borderRadius=borderRadius;
      oDiv.style.backgroundColor=color;
      oDiv.style.position=position;
     }


}


interface styleA{
    width:string,
    height:string,
    borderRadius:string
}

function move(users:Bar){
    setInterval(function () {
        users.oDiv.style.left=parseInt(Math.random()*780)+"px";
        users.oDiv.style.top=parseInt(Math.random()*380)+"px";
    },360)
}
for(var i=0;i<10;i++){
    var bar=new Bar(document.createElement('div'),"20px","20px","50%","red","absolute");
    move(bar)
    document.getElementById("content").appendChild(bar.oDiv);
}





